package InterfaceDemo4;
public class Printer implements Device, NetworkDevice, UsbDevice {
    private String brand;

    public Printer(String brand) {
        this.brand = brand;
    }


    public void powerOn() {
        System.out.println(brand + "打印机开机，准备就绪");
    }


    public void powerOff() {
        System.out.println(brand + "打印机关机，保存设置");
    }


    public void connectNetwork() {
        System.out.println(brand + "打印机通过网络连接成功，IP: 192.168.1.100");
    }


    public void connectUsb() {
        System.out.println(brand + "打印机通过USB连接到主机，端口: USB3.0");
    }
}